<template>
  <div>
    <!-- 加载Table组件 -->
    <Table :getData="reqGetSku" :columns="columns" :pagination="true">
      <template #img="{row}">
        <img :src="row.skuDefaultImg" :alt="row.skuName">
      </template>
      <template #btns="{row}">
        <el-button type="primary">上架</el-button>
        <el-button type="primary">编辑</el-button>
        <el-button type="primary">查看</el-button>
        <el-button type="primary">删除</el-button>
      </template>
    </Table>

  </div>
</template>

<script lang="ts">
export default {
  name: 'TableTest'
}
</script>

<script lang="ts" setup>
import { reqGetSku } from '@/api/product/sku'
import { ref } from 'vue'
import Table from '@/components/Table/index.vue'



const columns = ref([
  {
    type:'index',
    align:'center',
    label:"序号",
    width:60
  },
  {
    label:'名称',
    prop:'skuName',
  },
  {
    label:'描述',
    prop:'skuDesc',
  },
  {
    label:'默认图片',
    slot:'img'
  },
  {
    label:'操作',
    slot:'btns'
  }
])

</script>


<style></style>